package main

import (
	"fmt"
	"net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, "自定义多路复用器 ", r.URL.Path)
}

func main() {
	// 创建多路复用器
	nux := http.NewServeMux()
	nux.HandleFunc("/", handler)
	http.ListenAndServe(":8080", nux)
}
